﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eDepotSystem
{
    public class WorkSchedule
    {
        private string client;
        private DateTime startDate;
        private DateTime endDate;
        private Vehicle vehicle;
        private Driver driver;

        public string GetClient(){
            return client;
        }
        public DateTime GetStartDate(){
            return startDate;
        }
        public DateTime GetEndDate(){
            return endDate;
        }
        public Vehicle GetVehicle(){
            return vehicle;
        }
        public Driver GetDriver(){
            return driver;
        }

        public bool Started(){
            return (startDate < DateTime.Now);
        }
        public bool Ended()
        {
            return (endDate > DateTime.Now);
        }
        public bool IsCurrent()
        {
            DateTime now = DateTime.Now;
            return (Started() && !Ended());
        }
        public WorkSchedule(
            string client,
            DateTime startDate,
            DateTime endDate,
            Vehicle vehicle,
            Driver driver
        ){
            this.client = client;
            this.startDate = startDate;
            this.endDate = endDate;
            this.vehicle = vehicle;
            this.driver = driver;
        }
    }
}
